//
//  DetailsViewController.m
//  17-HomeWork
//
//  Created by dllo on 16/8/6.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "DetailsViewController.h"
#import "PersonModel.h"
@interface DetailsViewController ()

@end

@implementation DetailsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self subViews];

}
- (void)subViews {
    _addImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 64, self.view.bounds.size.width , self.view.bounds.size.width - 140)];
    _addImage.layer.cornerRadius = (self.view.bounds.size.width - 140) / 2;
    _addImage.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:_addImage];
    _nameText = [[UILabel alloc] initWithFrame:CGRectMake(50, 280, self.view.bounds.size.width - 100, 50)];
    _nameText.layer.borderWidth = 2.0;
    _nameText.textAlignment = 1;
    [self.view addSubview:_nameText];
    _iphoneText = [[UILabel alloc] initWithFrame:CGRectMake(50, 330, self.view.bounds.size.width - 100, 50)];
    _iphoneText.textAlignment = 1;
    _iphoneText.layer.borderWidth = 2.0;
    [self.view addSubview:_iphoneText];
    _text = [[UILabel alloc] initWithFrame:CGRectMake(50, 380, self.view.bounds.size.width - 100, 50)];
    _text.textAlignment = 1;
    _text.layer.borderWidth = 2.0;
    _text.layer.borderWidth = 2.0;
    [self.view addSubview:_text];
    _text.text = _personModel.address;
    _nameText.text = _personModel.name;
    _iphoneText.text = _personModel.iphone;
    _addImage.image = [UIImage imageNamed:_personModel.imageName];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
